#pragma once

#include "ITexture.h"


class CTexture: public ITexture
{
public:
	CTexture(uint width, uint height, uint levels, ETextureFormat format, bool dynamic);
	CTexture(const char* filepath, uint width, uint height, uint levels, ETextureFormat format, bool dynamic);
	virtual ~CTexture();

	//	ITexture
	virtual LockedRect	Lock(uint level, ETextureLockType lock_type);
	virtual void				Unlock(uint level);

	virtual void SavePNG(const char* filepath);
	//---

	operator IDirect3DTexture9* ();

private:
	IDirect3DTexture9* m_pTexture;
	bool	m_bDynamic;
};